<template>
  <div class="son">
    <h1>我是APP组件(孙)---{{car}}</h1>
  </div>
</template>

<script>
import { inject } from 'vue'
export default {
    name:'Son',
    setup(){
        let car = inject('car')
        console.log(car);
        return {car}
    }
}
</script>

<style>
    .son{
        background-color: rebeccapurple;
        padding: 10px;
    }
</style>